package com.example.feignapi.article.fallback;

import com.example.common.util.R;
import com.example.common.util.ResultCodeRecord;
import com.example.feignapi.article.ArticleClient;
import com.example.model.article.dto.ArticleCommentDto;
import com.example.model.article.dto.ArticleDto;
import com.example.model.comment.dto.CommentConfigDto;
import com.example.model.wemedia.dto.StatisticsDto;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class ArticleClientFallback implements ArticleClient {
    @Override
    public R addArticle(ArticleDto articleDto) {
        return R.error(ResultCodeRecord.SERVER_ERROR);
    }

    @Override
    public R queryLikesAndConllections(Integer wmUserId, Date beginDate, Date endDate) {
        return R.error(ResultCodeRecord.SERVER_ERROR);
    }

    @Override
    public R getNewPage(StatisticsDto statisticsDto, Long page, Long pageSize) {
        R r = new R();
        r.setCode(501);
        return r;
    }

    @Override
    public R getArticleConfigByArticleId(Long articleId) {
        return R.error(ResultCodeRecord.SERVER_ERROR);
    }

    @Override
    public R getNewsCommentsPage(ArticleCommentDto articleCommentDto, Long page, Long pageSize) {
        R r = new R();
        r.setCode(501);
        return r;
    }

    @Override
    public R updateCommentStatus(CommentConfigDto commentConfigDto) {
        return R.error(ResultCodeRecord.SERVER_ERROR);
    }
}
